import request from '@/utils/request'

// 查询工序列表
export function listOperations(query) {
  return request({
    url: '/base-data-service/base/operations/list',
    method: 'get',
    params: query
  })
}
export function getOperationWithParams(operationId) {
  return request({
    url: `/base-data-service/base/operationsWithParam/${operationId}`,
    method: 'get'
  })
}
// 查询工序详细
export function getOperations(operationId) {
  return request({
    url: '/base-data-service/base/operations/' + operationId,
    method: 'get'
  })
}

// 新增工序
export function addOperations(data) {
  return request({
    url: '/base-data-service/base/operations',
    method: 'post',
    data: data
  })
}

// 修改工序
export function updateOperations(data) {
  return request({
    url: '/base-data-service/base/operations',
    method: 'put',
    data: data
  })
}

// 删除工序
export function delOperations(operationId) {
  return request({
    url: '/base-data-service/base/operations/' + operationId,
    method: 'delete'
  })
}
